package stdying.handyweibo.injection.module;

import android.content.Context;

import dagger.Module;
import dagger.Provides;
import stdying.handyweibo.MainActivity;
import stdying.handyweibo.injection.PreActivity;
import stdying.handyweibo.view.IMainView;

/**
 * Description: MainActivityModule
 * Author: liulili
 * Created: 2015-11-23
 */
@Module
public class MainActivityModule {
    private MainActivity ainActivity;
    public MainActivityModule(MainActivity ainActivity){
        this.ainActivity = ainActivity;
    }

    @Provides
    @PreActivity
    MainActivity provideMainActivity(){
        return this.ainActivity;
    }

    @Provides
    @PreActivity
    IMainView provideIMainView(){
        return ainActivity;
    }

    @Provides
    @PreActivity
    Context provideContext(){
        return this.ainActivity.getBaseContext();
    }


}
